<template>
    <div>
        <Modal v-model="showDataModalFlag" title="修改资讯" @on-ok="handleSubmit2('formValidate2')" :mask-closable="false">
            <Form :label-width="100" ref="formValidate2" :rules="ruleValidate2" :model="data2">
                <FormItem label="标题" prop="year">
                    <Input placeholder="标题" class="input-select-class" v-model="data2.title"></Input>
                </FormItem>
                <FormItem label="图片" prop="operate_name2">
                    <div class="banner-wrapper">
                        <img :src="data2.logourl" class="banner" @click="handleClick2">
                        <div class="up-file">
                            <form>
                                <input class="bannerinput2" accept="image/*" name="upimage" type="file" @change="uploadBanner2($event)" style="width:100px;">
                            </form>
                        </div>
                    </div>
                </FormItem>
                <FormItem label="内容图1" prop="operate_name2">
                    <div class="banner-wrapper">
                        <img :src="data2.photo1url" class="banner" @click="picclick11">
                        <div class="up-file">
                            <form>
                                <input class="picinput11" accept="image/*" name="upimage" type="file" @change="uploadpic11($event)" style="width:100px;">
                            </form>
                        </div>
                    </div>
                </FormItem>
                <FormItem label="内容图2" prop="operate_name2">
                    <div class="banner-wrapper">
                        <img :src="data2.photo2url" class="banner" @click="picclick22">
                        <div class="up-file">
                            <form>
                                <input class="picinput22" accept="image/*" name="upimage" type="file" @change="uploadpic22($event)" style="width:100px;">
                            </form>
                        </div>
                    </div>
                </FormItem>
                <FormItem label="内容图3" prop="operate_name2">
                    <div class="banner-wrapper">
                        <img :src="data2.photo3url" class="banner" @click="picclick33">
                        <div class="up-file">
                            <form>
                                <input class="picinput33" accept="image/*" name="upimage" type="file" @change="uploadpic33($event)" style="width:100px;">
                            </form>
                        </div>
                    </div>
                </FormItem>
                <FormItem label="内容图4" prop="operate_name2">
                    <div class="banner-wrapper">
                        <img :src="data2.photo4url" class="banner" @click="picclick44">
                        <div class="up-file">
                            <form>
                                <input class="picinput44" accept="image/*" name="upimage" type="file" @change="uploadpic44($event)" style="width:100px;">
                            </form>
                        </div>
                    </div>
                </FormItem>
                <FormItem label="网址" prop="operate_name2">
                    <Input placeholder="网址" class="input-select-class" v-model="data2.url"></Input>
                </FormItem>
                <FormItem label="详述" prop="operate_name2">
                    <Input placeholder="详述" class="input-select-class" v-model="data2.describe"></Input>
                </FormItem>
            </Form>
        </Modal>
        <Row style="margin-top:20px">
            <Col span="19" class="table-form-input-select-col">
            <span class="alltitle"><router-link to="项目列表"> 项目列表</router-link>>最新资讯</span>
            </Col>
        </Row>
        <Row class="fazhanlicheng" style="margin-top:20px;height:40px;padding-left:20px">
            <span class="title">最新资讯</span>
        </Row>
        <Row class="fazhanlicheng" style="heigh:60px;padding: 20px">
            <Col class="inner-info2">标题</Col>
            <Col span="4">
            <Input class="time-picker" placeholder="输入标题" style="width: 100%" v-model="title" />
            </Col>
            <Col class="inner-info2" offset="1">图片(旧:200*150,新:900*383)</Col>
            <Col span="1">
            <div class="banner-wrapper">
                <img v-if="uploadbanner2" :src="uploadbanner2" class="banner" @click="handleClick">
                <i v-else class="img-border el-icon-plus avatar-uploader-icon" @click="handleClick">+</i>
                <div class="up-file">
                    <form>
                        <input class="bannerinput" accept="image/*" name="upimage" type="file" @change="uploadBanner($event)" style="width:100px;">
                    </form>
                </div>
            </div>
            </Col>
            <Col class="inner-info2" offset="1">网址</Col>
            <Col span="5">
            <Input class="time-picker" placeholder="网址" style="width: 100%" v-model="url" />
            </Col>
            <Col class="inner-info2" offset="1">描述</Col>
            <Col span="5">
            <Input class="time-picker" placeholder="描述" style="width: 100%" v-model="describe" />
            </Col>
        </Row>
        <Row class="fazhanlicheng" style="heigh:60px;padding: 20px">
            <Col class="inner-info2" offset="0">内容图1</Col>
            <Col span="1">
            <div class="banner-wrapper">
                <img v-if="pic1" :src="pic1" class="banner" @click="picclick1">
                <i v-else class="img-border el-icon-plus avatar-uploader-icon" @click="picclick1">+</i>
                <div class="up-file">
                    <form>
                        <input class="picinput1" accept="image/*" name="upimage" type="file" @change="uploadpic1($event)" style="width:100px;">
                    </form>
                </div>
            </div>
            </Col>
            <Col class="inner-info2" offset="1">内容图2</Col>
            <Col span="1">
            <div class="banner-wrapper">
                <img v-if="pic2" :src="pic2" class="banner" @click="picclick2">
                <i v-else class="img-border el-icon-plus avatar-uploader-icon" @click="picclick2">+</i>
                <div class="up-file">
                    <form>
                        <input class="picinput2" accept="image/*" name="upimage" type="file" @change="uploadpic2($event)" style="width:100px;">
                    </form>
                </div>
            </div>
            </Col>
            <Col class="inner-info2" offset="1">内容图3</Col>
            <Col span="1">
            <div class="banner-wrapper">
                <img v-if="pic3" :src="pic3" class="banner" @click="picclick3">
                <i v-else class="img-border el-icon-plus avatar-uploader-icon" @click="picclick3">+</i>
                <div class="up-file">
                    <form>
                        <input class="picinput3" accept="image/*" name="upimage" type="file" @change="uploadpic3($event)" style="width:100px;">
                    </form>
                </div>
            </div>
            </Col>
            <Col class="inner-info2" offset="1">内容图4</Col>
            <Col span="1">
            <div class="banner-wrapper">
                <img v-if="pic4" :src="pic4" class="banner" @click="picclick4">
                <i v-else class="img-border el-icon-plus avatar-uploader-icon" @click="picclick4">+</i>
                <div class="up-file">
                    <form>
                        <input class="picinput4" accept="image/*" name="upimage" type="file" @change="uploadpic4($event)" style="width:100px;">
                    </form>
                </div>
            </div>
            </Col>
        </Row>
        <Row class="add-new-progress" style="heigh:60px;background:#f5f7f9">
            <Button type="primary" style="width:100px" @click="handleCoInfo">确认提交</Button>
        </Row>
        <div class="content-div" style="margin-top:10px">
            <Table border stripe :columns="columns2" :data="data" ref="table"></Table>
        </div>
    </div>
</template>
<script>
import {
    formatDate
} from '@/js/date.js'
export default {
    data() {

            return {
                picurl1: "",
                picurl2: "",
                picurl3: "",
                picurl4: "",
                bannerurl: "",
                pic1: "",
                pic2: "",
                pic3: "",
                pic4: "",
                uploadbanner2: "",
                formValidate2: {

                },
                ruleValidate2: {

                },
                data: [],
                columns2: [{
                    title: "序号",
                    key: "id",
                    width: 99,

                }, {
                    title: "标题",
                    key: "title",

                }, {
                    title: "图片",
                    key: "logo",
                    render: (h, params) => {
                        return h("div", [
                            h(
                                "img", {
                                    attrs: {
                                        src: "https://evp.51job.com/51job/api/51miniadmin/" +params.row.logo,

                                    },
                                    style: {
                                        width: "60px",
                                        height: "60px"
                                    }

                                },

                            ),

                        ], );
                    }


                }, {
                    title: "内容图1",
                    key: "photo1",
                    render: (h, params) => {
                        let photo1 = params.row.photo1;
                        if (photo1 != "") {
                            return h("div", [
                                h(
                                    "img", {
                                        attrs: {
                                            src: "https://evp.51job.com/51job/api/51miniadmin/" + params.row.photo1,
                                            alt: "无"

                                        },
                                        style: {
                                            width: "60px",
                                            height: "60px"
                                        }

                                    },

                                ),

                            ], );
                        }

                    }


                }, {
                    title: "内容图2",
                    key: "photo2",
                    render: (h, params) => {
                        let photo2 = params.row.photo2;
                        if (photo2 != "") {
                            return h("div", [
                                h(
                                    "img", {
                                        attrs: {
                                            src: "https://evp.51job.com/51job/api/51miniadmin/" + params.row.photo2,
                                            alt: "无"

                                        },
                                        style: {
                                            width: "60px",
                                            height: "60px"
                                        }

                                    },

                                ),

                            ], );
                        }
                    }


                }, {
                    title: "内容图3",
                    key: "photo3",
                    render: (h, params) => {
                        let photo3 = params.row.photo3;
                        if (photo3 != "") {
                            return h("div", [
                                h(
                                    "img", {
                                        attrs: {
                                            src: "https://evp.51job.com/51job/api/51miniadmin/" + params.row.photo3,
                                            alt: "无"

                                        },
                                        style: {
                                            width: "60px",
                                            height: "60px"
                                        }

                                    },

                                ),

                            ], );
                        }
                    }


                }, {
                    title: "内容图4",
                    key: "photo4",
                    render: (h, params) => {
                        let photo4 = params.row.photo4;
                        if (photo4 != "") {
                            return h("div", [
                                h(
                                    "img", {
                                        attrs: {
                                            src: "https://evp.51job.com/51job/api/51miniadmin/" + params.row.photo4,
                                            alt: "无"

                                        },
                                        style: {
                                            width: "60px",
                                            height: "60px"
                                        }

                                    },

                                ),

                            ], );
                        }
                    }


                }, {
                    title: "网址",
                    key: "url",


                }, {
                    title: "操作",
                    key: "action",
                    width: 150,

                    render: (h, params) => {
                        return h("div", [
                            h(
                                "span", {
                                    style: {
                                        textDecoration: "underline",
                                        color: "#4b80fd",
                                        cursor: "pointer"
                                    },
                                    on: {
                                        click: () => {
                                            this.moveUp(params.index);
                                        }
                                    }
                                },
                                "上移"
                            ),
                            h(
                                "span", {
                                    style: {
                                        textDecoration: "underline",
                                        color: "#4b80fd",
                                        cursor: "pointer",
                                        'margin-left': "5px",
                                    },
                                    on: {
                                        click: () => {
                                            this.moveDown(params.index);
                                        }
                                    }
                                },
                                "下移"
                            ),
                            h(
                                "span", {
                                    style: {
                                        textDecoration: "underline",
                                        color: "#4b80fd",
                                        cursor: "pointer",
                                        'margin-left': "5px",
                                    },
                                    on: {
                                        click: () => {
                                            this.edit(params.index);
                                        }
                                    }
                                },
                                "编辑"
                            ),
                            h(
                                "span", {
                                    style: {
                                        textDecoration: "underline",
                                        color: "#4b80fd",
                                        cursor: "pointer",
                                        'margin-left': "5px",
                                    },
                                    on: {
                                        click: () => {
                                            this.removeData(params.index);
                                        }
                                    }
                                },
                                "删除"
                            )
                        ], );
                    }
                }],
                showDataModalObject: {},
                data2: {},
                showDataModalFlag: false,
                title: '',
                pic: '',
                url: ''
            }
        },

        methods: {
            picclick11() {
                $(".picinput11").click();
            },
            picclick22() {
                $(".picinput22").click();
            },
            picclick33() {
                $(".picinput33").click();
            },
            picclick44() {
                $(".picinput44").click();
            },
            picclick1() {
                $(".picinput1").click();
            },
            picclick2() {
                $(".picinput2").click();
            },
            picclick3() {
                $(".picinput3").click();
            },
            picclick4() {
                $(".picinput4").click();
            },
            handleClick() {
                $(".bannerinput").click();
            },
            handleClick2() {
                $(".bannerinput2").click();
            },
            uploadpic11(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.data2.photo1url = imgcode;
                    console.log(self.data2.photo1);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.data2.photo1url
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl1 = data.url;
                        }
                    });

                };
            },
            uploadpic22(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.data2.photo2url = imgcode;
                    console.log(self.data2.photo2);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.data2.photo2url
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl2 = data.url;
                        }
                    });

                };
            },
            uploadpic33(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.data2.photo3url = imgcode;
                    console.log(self.data2.photo3);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.data2.photo3url
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl3 = data.url;
                        }
                    });

                };
            },
            uploadpic44(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.data2.photo4url = imgcode;
                    console.log(self.data2.photo4);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.data2.photo4url
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl4 = data.url;
                        }
                    });

                };
            },
            uploadpic1(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.pic1 = imgcode;
                    console.log(self.pic1);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.pic1
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl1 = data.url;
                        }
                    });

                };
            },
            uploadpic2(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.pic2 = imgcode;
                    console.log(self.pic2);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.pic2
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl2 = data.url;
                        }
                    });

                };
            },
            uploadpic3(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.pic3 = imgcode;
                    console.log(self.pic3);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.pic3
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl3 = data.url;
                        }
                    });

                };
            },
            uploadpic4(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.pic4 = imgcode;
                    console.log(self.pic4);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.pic4
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.picurl4 = data.url;
                        }
                    });

                };
            },
            uploadBanner(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.uploadbanner2 = imgcode;
                    console.log(self.uploadbanner2);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.uploadbanner2
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.bannerurl = data.url;
                        }
                    });

                };
            },
            uploadBanner2(e) {
                console.log(e);

                var self = this;
                var file = e.target.files[0];
                var filesize = file.size;
                var filename = file.name;

                if (filesize > 2101440) {
                    self.$Message.error("图片超过2m");
                }
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function(e) {
                    var imgcode = e.target.result;
                    self.data2.logourl = imgcode;
                    console.log(self.data2.logo);
                    $.ajax({
                        url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslogo",
                        data: {
                            file: self.data2.logourl
                        },
                        type: "POST",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            self.bannerurl = data.url;
                        }
                    });

                };
            },
            moveUp(index) {
                if (index == 0) {
                    this.$Message.error('已经排在第一位！')
                    return
                }
                var id = this.data[index].id
                var self = this
                $.ajax({
                    url: " https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmsedit&id="+id+"&sort=1",
                    type: "POST",
                    dataType: "json",
                    success: function(data) {
                        console.log(data);
                        if (data.code == 1) {
                            self.newslist();
                        }
                    }
                });
            },
            moveDown(index) {
                if (index == this.data.length - 1) {
                    this.$Message.error('已经排在最后一位！')
                    return
                }
                var id = this.data[index].id
                var self = this
                $.ajax({
                    url: " https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmsedit&id="+id+"&sort=2",
                    type: "POST",
                    dataType: "json",
                    success: function(data) {
                        console.log(data);
                        if (data.code == 1) {
                            self.newslist();
                        }
                    }
                });
            },
            removeData(index) {
                var self = this
                self.$Modal.confirm({
                    title: '确认删除？',
                    content: '',
                    onOk: () => {

                        var self = this;
                        self.$api.post('/api/v1/edit', self.data[index], function(result) {
                            self.data.splice(index, 1)
                            self.$Message.info(result.message)
                        })

                        console.log(self.data[index].id)
                        $.ajax({
                            url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmsdel&id=" + self.data[index].id,

                            type: "POST",
                            dataType: "json",
                            success: function(data) {

                                console.log(data);

                            }
                        });
                    },
                    onCancel: () => {
                        this.$Message.info('取消删除');
                    }
                });

            },
            edit(index) {
                this.showDataModalFlag = true;
                this.data2 = this.data[index];
                this.bannerurl = ''
                this.uploadbanner2 = ''
                this.pic1 = ''
                this.picurl1 = ''
                this.pic2 = ''
                this.picurl2 = ''
                this.pic3 = ''
                this.picurl3 = ''
                this.pic4 = ''
                this.picurl4 = ''


                console.log(this.data[index])
            },


            handleCoInfo() {

                var poid = localStorage.pid;
                var self = this

                $.ajax({
                    url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmscreate&id=" + poid,
                    data: {
                        title: self.title,
                        logo: self.bannerurl,
                        url: self.url,
                        photo1: self.picurl1,
                        photo2: self.picurl2,
                        photo3: self.picurl3,
                        photo4: self.picurl4,

                    },
                    type: "POST",
                    dataType: "json",
                    success: function(data) {
                        console.log(data);
                        if (data.code == 1) {                            
                            self.$Message.success("添加成功！");
                            self.newslist();

                            self.bannerurl = ''
                            self.uploadbanner2 = ''
                            self.pic1 = ''
                            self.picurl1 = ''
                            self.pic2 = ''
                            self.picurl2 = ''
                            self.pic3 = ''
                            self.picurl3 = ''
                            self.pic4 = ''
                            self.picurl4 = ''
                        }
                        else {
                            self.$Message.error(data.msg)
                        }
                    }
                });
            },
            handleSubmit2() {
                var self = this
                console.log(self.data2.logo,self.data2.photo1)
                if(self.bannerurl==""){
                    self.bannerurl=self.data2.logo
                }
                if(self.picurl1==""){
                    self.picurl1=self.data2.photo1
                }
                if(self.picurl2==""){
                    self.picurl2=self.data2.photo2
                }
                if(self.picurl3==""){
                    self.picurl3=self.data2.photo3
                }
                if(self.picurl4==""){
                    self.picurl4=self.data2.photo4
                }
                $.ajax({
                    url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmsedit&id=" + self.data2.id,
                    data: {
                        title: self.data2.title,
                        describe: self.data2.describe,
                        logo: self.bannerurl,
                        url: self.data2.url,
                        photo1: self.picurl1,
                        photo2: self.picurl2,
                        photo3: self.picurl3,
                        photo4: self.picurl4,

                    },
                    type: "POST",
                    dataType: "json",
                    success: function(data) {
                        console.log(data);
                        if (data.code == 1) {
                            self.$Message.success("修改成功！");
                            self.newslist();
                        }
                        else {
                            self.$Message.error(data.msg)
                        }
                    }
                });
            },

            newslist() {
                var self = this;
                var poid = localStorage.pid;

                $.ajax({
                    url: "https://evp.51job.com/51job/api/51miniadmin/back.php?action=cmslist&id=" + poid,
                    type: "POST",
                    dataType: "json",
                    success: function(data) {
                        console.log(data);
                        var temp = data.data;
                        for (var i = 0; i < data.data.length; i++) {
                             if (temp[i].logo != "" && temp[i].logo.indexOf("https")==-1) {
                                temp[i].logourl = "https://evp.51job.com/51job/api/51miniadmin/" + data.data[i].logo
                            }
                            else {
                                temp[i].logourl = data.data[i].logo
                            }
                            if (temp[i].photo1 != "" && temp[i].photo1.indexOf("https")==-1) {
                                temp[i].photo1url = "https://evp.51job.com/51job/api/51miniadmin/" + data.data[i].photo1
                            }
                            else {
                                temp[i].photo1url = data.data[i].photo1
                            }
                            if (temp[i].photo2 != "" && temp[i].photo2.indexOf("https")==-1) {
                                temp[i].photo2url = "https://evp.51job.com/51job/api/51miniadmin/" + data.data[i].photo2
                            }
                            else {
                                temp[i].photo2url = data.data[i].photo2
                            }
                            if (temp[i].photo3 != "" && temp[i].photo3.indexOf("https")==-1) {
                                temp[i].photo3url = "https://evp.51job.com/51job/api/51miniadmin/" + data.data[i].photo3
                            }
                            else {
                                temp[i].photo3url = data.data[i].photo3
                            }
                            if (temp[i].photo4 != "" && temp[i].photo4.indexOf("https")==-1) {
                                temp[i].photo4url = "https://evp.51job.com/51job/api/51miniadmin/" + data.data[i].photo4
                            }
                            else {
                                temp[i].photo4url = data.data[i].photo4
                            }
                        }
                        self.data = temp

                    }
                });
            },


        },
        created() {
            var self = this;
            var poid = localStorage.pid;
            self.newslist();
        }
}
</script>
<style scoped>
.innertitle {
    line-height: 30px;
    font-size: 14px;
    text-decoration: underline;
    color: #4B80FD;
    font-family: MicrosoftYaHei;
    cursor: pointer;
}

.fazhanlicheng {
    box-sizing: border-box;
    background: #fff;
    margin-bottom: 1px;
    padding: 0px;
}

.title {
    font-size: 14px;
    color: #333333;
    letter-spacing: 0;
    line-height: 40px;
    font-weight: bold;
}

.inner-info2 {
    float: left;
    line-height: 60px;
    font-size: 14px;
    color: #333;
    font-family: MicrosoftYaHei;
    margin-right: 10px;
}

.time-picker {
    margin-top: 15px;
}

.add-new-progress {
    box-sizing: border-box;
    background: #fff;
    padding: 0;
    text-align: center;
    color: #4B80FD;
    font-family: SourceHanSansCN-Normal;
    font-size: 14px;
    line-height: 60px;
    cursor: pointer;
}

.picinput11,
.picinput22,
.picinput33,
.picinput44,
.picinput1,
.picinput2,
.picinput3,
.picinput4,
.bannerinput,
.bannerinput2 {
    display: none;
}

.img-border {
    border: 1px dashed #d9d9d9;
    background: #e5e5e5;
    display: block;
    width: 60px;
    text-align: center;
    height: 60px;
    line-height: 60px;
    font-size: 50px;
    cursor: pointer;
}

.banner {
    width: 60px;
    text-align: center;
    height: 60px;
}

.avatar-uploader-icon-banner {
    font-size: 28px;
    color: #8c939d;
    width: 167px;
    height: 84px;
    line-height: 84px;
    text-align: center;
    float: left;
    position: relative;
}
</style>
